<!DOCTYPE html>
<html>
<head>
  <style>
  p { margin: 8px; font-size:16px; }
  .selected { color:blue; }
  .highlight { background:yellow; }
  </style>
  <script src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>

  <p>Hello</p>
  <p>and</p>
  <p class="selected">Goodbye</p>

<script>
  $("p:last").addClass("selected");
  </script>

</body>
</html>